﻿using UnityEngine;
using System.Collections;

public class CameraController : MonoBehaviour {
	GameObject Player;
	Vector3 Offset;
	void Start () {
		Offset = new Vector3 (0,10,1);
		Player = GameObject.FindGameObjectWithTag ("Player");
		transform.position = Player.transform.position + Offset;
		transform.LookAt (Player.transform.position);
	}
	void FixedUpdate () {
		transform.position = Vector3.Slerp(transform.position, Player.transform.position+Offset, Time.deltaTime*10);
	}
}
